package com.example.springboot_demo.demos.web.user_work.Server.ServerImpl;

import com.example.springboot_demo.demos.web.user_work.pojo.User;
import com.example.springboot_demo.demos.web.user_work.Mapper.UserMapper;
import com.example.springboot_demo.demos.web.user_work.Server.UserServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserServer {
    @Autowired
    private UserMapper userMapper;


    @Override
    public List<User> getUserInfos() {
        List<User> userList = userMapper.getUsers();
        return userList;
    }

    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserInfo(id);
    }
}
